package com.hmkj.core.mapper.dailyReport;

import com.hmkj.common.baseMapper.GenericMapper;
import com.hmkj.core.model.dailyReport.DailyReportModel;
import com.hmkj.core.po.dailyReport.DailyReport;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 日报表相关Dao接口<br>
 *
 * @author lizhijie
 * @date   2018-07-08 04:33:13
 */
public interface DailyReportMapper extends GenericMapper< DailyReport,Integer> {

    /**
     * 日报表列表
     *
     * @param params
     * @return
     */
    @Select("SELECT t.* FROM s_daily_report t WHERE 1 = 1 ${whereSql} ${sortSql} limit ${nowPage}, ${pageSize}")
    List<DailyReportModel> findListBySqlJoin(Map<String, Object> params);

    /**
     * 日报统计
     *
     * @param params
     * @return
     */
    @Select("SELECT count(1) FROM s_daily_report t WHERE 1 = 1 ${whereSql}")
    long countBySqlJoin(Map<String, Object> params);
}
